package com.lzx.es.feign;

import com.lzx.es.entity.answerVO.Problem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Component
@FeignClient("five-cube-answer")
public interface AnswerClient {

    //用户修改头像或昵称 es同步
    @GetMapping("/answer/problem/web/getUserProblemListToES/{userId}")
    List<Problem> getUserArticleListToES(@PathVariable Long userId);

    //获取所有问题
    @GetMapping("/answer/problem/web/getProblemListToES")
    List<Problem> getProblemListToES();

    //根据id查询问题
    @GetMapping("/answer/problem/web/getProblem/{problemId}")
    Problem getProblem(@PathVariable int problemId);
}
